/****************************************************
          File Name:6-1.cpp
          Author: Abby Cin
          Mail: abbytsing@gmail.com
          Created Time: Thu 18 Dec 2014 08:24:26 PM CST
*****************************************************/

#include<iostream>
#include<cctype>
using namespace std;

int main()
{
    char ch;

    while(cin.get(ch))
    {
        if(ch == '@')
            break;
        if(!isdigit(ch))
        {
            if(islower(ch))
                cout << char(toupper(ch));
            else if(isupper(ch))
                cout << static_cast<char>(tolower(ch));     // another way
            else
                cout << char(ch);
        }
    }

    return 0;
}
